aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykyta Holubakha <hilobakho@gmail.com>2017-07-05 20:53:10 +0300
committerMykyta Holubakha <hilobakho@gmail.com>2017-07-05 20:53:10 +0300
commit89ea936652960049bf6ad307df83f52733819683 (patch)
tree13a6d07b3a27d0e31bbe7dd63a2b6a1fc189c31a /pomu/source/portage.py
parentAdded the manpage (diff)
downloadpomu-89ea936652960049bf6ad307df83f52733819683.tar.gz
pomu-89ea936652960049bf6ad307df83f52733819683.tar.bz2
pomu-89ea936652960049bf6ad307df83f52733819683.zip
Some fixes
Diffstat (limited to 'pomu/source/portage.py')
-rw-r--r--pomu/source/portage.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pomu/source/portage.py b/pomu/source/portage.py
index 1dc740b..f4f112c 100644
--- a/pomu/source/portage.py
+++ b/pomu/source/portage.py
@@ -39,9 +39,9 @@ class PortagePackage():
f.write(self.slot + '\n')
@staticmethod
- def from_data_file(path):
+ def from_data_dir(pkgdir):
try:
- lines = [x.strip() for x in open(path, 'r')]
+ lines = [x.strip() for x in open(path.join(pkgdir, 'PORTAGE_DATA'), 'r')]
except:
return Result.Err('Could not read data file')
if len(lines) < 5:
@@ -125,7 +125,7 @@ class PortageSource():
@classmethod
def from_meta_dir(cls, metadir):
- return PortagePackage.from_data_dir(cls, path.join(metadir, 'PORTAGE_DATA'))
+ return PortagePackage.from_data_dir(cls, metadir)
def sanity_check(repo, category, name, vernum, suff, rev, slot, ver=None):