Commits

Steve Borho committed bc6e090

wctxactions: add return values to early return statements

These were returning None, so they were ok, but explicit is better

  • Participants
  • Parent commits 1c10df2
  • Branches stable

Comments (0)

Files changed (1)

tortoisehg/hgqt/wctxactions.py

         elif res == 1:
             revertopts['rev'] = repo[None].p2().rev()
         else:
-            return
+            return False
         commands.revert(ui, repo, *files, **revertopts)
     else:
         wctx = repo[None]
             _('Delete the following unversioned files?'),
             parent, (_('&Delete'), _('Cancel')), 1, 1, files).run()
     if res == 1:
-        return
+        return False
     for wfile in files:
         os.unlink(wfile)
     return True
     fd = QFileDialog(parent)
     fname = fd.getSaveFileName(parent, _('Copy file to'), wfile)
     if not fname:
-        return
+        return False
     fname = hglib.fromunicode(fname)
     wfiles = [wfile, fname]
     opts = {'force': True}  # existing file is already checked by QFileDialog