diff options
author | Papoteur <papoteur@mageialinux-online.org> | 2015-12-17 22:33:15 +0100 |
---|---|---|
committer | Papoteur <papoteur@mageialinux-online.org> | 2015-12-17 22:33:15 +0100 |
commit | b1b52222724f3e45dbf287a156b15eae68556763 (patch) | |
tree | b47af277ec57efde5794acdab748fc14d38cf6a8 /MgaRepo/rpmutil.py | |
parent | b42652d28cd89cf646eaaf0b05c83766b4663a8d (diff) | |
download | mgarepo-b1b52222724f3e45dbf287a156b15eae68556763.tar mgarepo-b1b52222724f3e45dbf287a156b15eae68556763.tar.gz mgarepo-b1b52222724f3e45dbf287a156b15eae68556763.tar.bz2 mgarepo-b1b52222724f3e45dbf287a156b15eae68556763.tar.xz mgarepo-b1b52222724f3e45dbf287a156b15eae68556763.zip |
Doesn't raise error if SOURCES is not present in remore or local package.
Diffstat (limited to 'MgaRepo/rpmutil.py')
-rw-r--r-- | MgaRepo/rpmutil.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py index 531c5fc..fff505b 100644 --- a/MgaRepo/rpmutil.py +++ b/MgaRepo/rpmutil.py @@ -223,9 +223,15 @@ def put_srpm(srpmfile, markrelease=False, striplog=True, branch=None, usourcesdir = os.path.join(unpackdir, "SOURCES") uspecsentries = os.listdir(uspecsdir) - usourcesentries = os.listdir(usourcesdir) + if os.path.isdir(usourcesdir): + usourcesentries = os.listdir(usourcesdir) + else: + usourcesentries=[] specsentries = os.listdir(specsdir) - sourcesentries = os.listdir(sourcesdir) + if os.path.isdir(sourcesdir): + sourcesentries = os.listdir(sourcesdir) + else: + sourcesentries=[] # Remove old entries for entry in [x for x in specsentries |