diff options
author | Micah Anderson <micah@riseup.net> | 2013-10-22 13:29:11 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2013-10-22 13:29:11 -0400 |
commit | f22b1a04f892857d162d87f9c9e120e7c5daadf7 (patch) | |
tree | 8998a60a2f55aa6f22a76e7aa1ec176e16f5cf33 /src/leap/bitmask/util | |
parent | dd907d3098c582b9e92eb181efb87453f046dcc6 (diff) | |
parent | 522b886046baf114f2b86173661e568c7c065da6 (diff) |
Merge remote-tracking branch 'kali/debian-0.3.4' into debian
Diffstat (limited to 'src/leap/bitmask/util')
-rw-r--r-- | src/leap/bitmask/util/__init__.py | 14 | ||||
-rw-r--r-- | src/leap/bitmask/util/constants.py | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/leap/bitmask/util/__init__.py b/src/leap/bitmask/util/__init__.py index f762a350..b58e6e3b 100644 --- a/src/leap/bitmask/util/__init__.py +++ b/src/leap/bitmask/util/__init__.py @@ -62,3 +62,17 @@ def update_modification_ts(path): """ os.utime(path, None) return get_modification_ts(path) + + +def is_file(path): + """ + Returns True if the path exists and is a file. + """ + return os.path.isfile(path) + + +def is_empty_file(path): + """ + Returns True if the file at path is empty. + """ + return os.stat(path).st_size is 0 diff --git a/src/leap/bitmask/util/constants.py b/src/leap/bitmask/util/constants.py index 63f6b1f7..e6a6bdce 100644 --- a/src/leap/bitmask/util/constants.py +++ b/src/leap/bitmask/util/constants.py @@ -16,4 +16,4 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. SIGNUP_TIMEOUT = 5 -REQUEST_TIMEOUT = 10 +REQUEST_TIMEOUT = 15 |