Skip to content

Instantly share code, notes, and snippets.

@1ace
Created March 3, 2015 07:36
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1ace/c789158b4c4adf612dc4 to your computer and use it in GitHub Desktop.
Save 1ace/c789158b4c4adf612dc4 to your computer and use it in GitHub Desktop.
Patch for https://linux.dropbox.com/packages/dropbox.py making `dropbox running` compatible with a shell
--- dropbox.py 2015-03-03 08:33:27.509681479 +0100
+++ dropbox.py 2015-03-03 08:34:11.816959170 +0100
@@ -1054,9 +1054,9 @@
u"""return whether dropbox is running
dropbox running
-Returns 1 if running 0 if not running.
+Returns 0 if running 1 if not running.
"""
- return int(is_dropbox_running())
+ return int(not is_dropbox_running())
@command
@requires_dropbox_running
@1ace
Copy link
Author

1ace commented Mar 3, 2015

This allows for something like this for instance:

dropbox running && dropbox status || dropbox start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment