Skip to content

Commit

Permalink
Fix incorrect string comparisons using "is"
Browse files Browse the repository at this point in the history
  • Loading branch information
wavexx committed Aug 17, 2020
1 parent ac1a621 commit d1a25e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion printrun/pronsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def do_exit(self, l):
self.log("Setting bed temp to 0")
self.p.send_now("M140 S0.0")
self.log("Disconnecting from printer...")
if self.p.printing and l is not "force":
if self.p.printing and l != "force":
self.log(_("Are you sure you want to exit while printing?\n\
(this will terminate the print)."))
if not self.confirm():
Expand Down
4 changes: 2 additions & 2 deletions printrun/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def decorator(self, *args, **kwargs):
sep = "\n"
if helptxt.find("\n") >= 0:
sep = "\n\n"
if self.default is not "":
if self.default != "":
deftxt = _("Default: ")
resethelp = _("(Control-doubleclick to reset to default value)")
if len(repr(self.default)) > 10:
Expand Down Expand Up @@ -113,7 +113,7 @@ def update(self):
self.value = self.widget.GetValue()

def set_default(self, e):
if e.CmdDown() and e.ButtonDClick() and self.default is not "":
if e.CmdDown() and e.ButtonDClick() and self.default != "":
self.widget.SetValue(self.default)
else:
e.Skip()
Expand Down

0 comments on commit d1a25e4

Please sign in to comment.