summaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-03-21 22:47:13 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-03-21 22:47:13 +0000
commit56de97861c73c2c054c9d8560188d7b6c5b330d4 (patch)
tree46cc1993150ed5a9e208a811142b550484391e25 /src/frontend
parentb741ff730128eca27c70ebc591a67ace44bff1db (diff)
optimise the code a little
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/gui/sisyphus-gui.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py
index 9a8a87e..332c6e0 100644
--- a/src/frontend/gui/sisyphus-gui.py
+++ b/src/frontend/gui/sisyphus-gui.py
@@ -385,11 +385,11 @@ class MainWorker(QtCore.QObject):
CATEGORY = subprocess.check_output(['qxpak', '-x', '-O'] + str(binpkg + '.xpak').split() + ['CATEGORY'])
os.remove(str(binpkg + '.xpak'))
- if os.path.isdir(portageCacheDir + CATEGORY.decode().strip()):
- shutil.move(str(binpkg + '.tbz2'), os.path.join(portageCacheDir + CATEGORY.decode().strip(), os.path.basename(str(binpkg + '.tbz2'))))
+ if os.path.isdir(os.path.join(portageCacheDir, CATEGORY.decode().strip())):
+ shutil.move(str(binpkg + '.tbz2'), os.path.join(os.path.join(portageCacheDir, CATEGORY.decode().strip()), os.path.basename(str(binpkg + '.tbz2'))))
else:
- os.makedirs(portageCacheDir + CATEGORY.decode().strip())
- shutil.move(str(binpkg + '.tbz2'), os.path.join(portageCacheDir + CATEGORY.decode().strip(), os.path.basename(str(binpkg + '.tbz2'))))
+ os.makedirs(os.path.join(portageCacheDir, CATEGORY.decode().strip()))
+ shutil.move(str(binpkg + '.tbz2'), os.path.join(os.path.join(portageCacheDir, CATEGORY.decode().strip()), os.path.basename(str(binpkg + '.tbz2'))))
if os.path.exists(str(binpkg + '.tbz2')):
os.remove(str(binpkg + '.tbz2'))
@@ -446,11 +446,11 @@ class MainWorker(QtCore.QObject):
CATEGORY = subprocess.check_output(['qxpak', '-x', '-O'] + str(binpkg + '.xpak').split() + ['CATEGORY'])
os.remove(str(binpkg + '.xpak'))
- if os.path.isdir(portageCacheDir + CATEGORY.decode().strip()):
- shutil.move(str(binpkg + '.tbz2'), os.path.join(portageCacheDir + CATEGORY.decode().strip(), os.path.basename(str(binpkg + '.tbz2'))))
+ if os.path.isdir(os.path.join(portageCacheDir, CATEGORY.decode().strip())):
+ shutil.move(str(binpkg + '.tbz2'), os.path.join(os.path.join(portageCacheDir, CATEGORY.decode().strip()), os.path.basename(str(binpkg + '.tbz2'))))
else:
- os.makedirs(portageCacheDir + CATEGORY.decode().strip())
- shutil.move(str(binpkg + '.tbz2'), os.path.join(portageCacheDir + CATEGORY.decode().strip(), os.path.basename(str(binpkg + '.tbz2'))))
+ os.makedirs(os.path.join(portageCacheDir, CATEGORY.decode().strip()))
+ shutil.move(str(binpkg + '.tbz2'), os.path.join(os.path.join(portageCacheDir, CATEGORY.decode().strip()), os.path.basename(str(binpkg + '.tbz2'))))
if os.path.exists(str(binpkg + '.tbz2')):
os.remove(str(binpkg + '.tbz2'))