diff options
author | Julien Valroff <julien@kirya.net> | 2011-10-02 07:08:31 +0200 |
---|---|---|
committer | Julien Valroff <julien@kirya.net> | 2011-10-02 07:08:31 +0200 |
commit | da2cce92a7eed706d04d6cbe778fd1bf32f18eeb (patch) | |
tree | 046d586f82a8fc8f960c32eb3ff4e0814efd21ad /rapid/device.py | |
parent | 4cfe0196b5ac9147560b8d3730aec9a1c615c67e (diff) |
Imported Upstream version 0.4.2upstream/0.4.2
Diffstat (limited to 'rapid/device.py')
-rw-r--r-- | rapid/device.py | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/rapid/device.py b/rapid/device.py index dcfdf94..423acdd 100644 --- a/rapid/device.py +++ b/rapid/device.py @@ -156,21 +156,5 @@ def is_DCIM_device(path): test_path = os.path.join(path, "DCIM") return utilities.is_directory(test_path) -def is_backup_media(path, identifiers, writeable=True): - """ Test to see if path is used as a backup medium for storing photos or videos - - Identifiers is expected to be a list of folder names to check to see - if the path is a backup path. Only one of them needs to be present - for the path to be considered a backup medium. - - If writeable is True, the directory must be writeable by the user """ - suitable = False - - for identifier in identifiers: - if os.path.isdir(os.path.join(path, identifier)): - if writeable: - suitable = os.access(os.path.join(path, identifier), os.W_OK) - else: - suitable = True - return suitable + |