summaryrefslogtreecommitdiff
path: root/nephilim/plugins/Filebrowser.py
diff options
context:
space:
mode:
Diffstat (limited to 'nephilim/plugins/Filebrowser.py')
-rw-r--r--nephilim/plugins/Filebrowser.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/nephilim/plugins/Filebrowser.py b/nephilim/plugins/Filebrowser.py
index f9b07f6..d28b754 100644
--- a/nephilim/plugins/Filebrowser.py
+++ b/nephilim/plugins/Filebrowser.py
@@ -74,14 +74,14 @@ class wgFilebrowser(QtWidgets.QWidget):
for index in self.selectedIndexes():
filepath = self.model().filePath(index)
if os.path.isdir(filepath):
- perm = 0755
+ perm = 0o755
else:
- perm = 0644
+ perm = 0o644
self.logger.info('Changind permissions of %s to %d.'%(filepath, perm))
try:
os.chmod(filepath, perm)
- except OSError, e:
+ except OSError as e:
self.logger.error('Can\'t change permissions: %s.'%e)
def selection_copy_to_collection(self):
@@ -96,7 +96,7 @@ class wgFilebrowser(QtWidgets.QWidget):
else:
shutil.copy(filepath, self.plugin.settings.value('MPD/music_dir'))
target_paths.append(path_base)
- except (OSError, IOError), e:
+ except (OSError, IOError) as e:
self.logger.error('Error copying to collection: %s.'%e)
self.plugin.mpclient.update_db(target_paths)