Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix comparisons to literals #340

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions qds_sdk/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ def parse(cls, args):
raise ParseError("dbtap_id and db_table are required",
cls.optparser.format_help())

if options.mode is "1":
if options.mode == "1":
if options.hive_table is None:
raise ParseError("hive_table is required for mode 1",
cls.optparser.format_help())
Expand All @@ -1134,7 +1134,7 @@ def parse(cls, args):
raise ParseError("db_update_mode should either be left blank for append "
"mode or be 'updateonly' or 'allowinsert'",
cls.optparser.format_help())
if options.db_update_mode is "updateonly":
if options.db_update_mode == "updateonly":
if options.db_update_keys is None:
raise ParseError("db_update_keys is required when db_update_mode "
"is 'updateonly'",
Expand Down Expand Up @@ -1521,7 +1521,7 @@ def _callback(downloaded, total):

`total`: Total file size to be downloaded (int)
'''
if (total is 0) or (downloaded == total):
if (total == 0) or (downloaded == total):
return
progress = downloaded*100/total
sys.stderr.write('\r[{0}] {1}%'.format('#'*progress, progress))
Expand Down