aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/rpmutil.py
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageialinux-online.org>2015-12-17 22:33:15 +0100
committerPapoteur <papoteur@mageialinux-online.org>2015-12-17 22:33:15 +0100
commitb1b52222724f3e45dbf287a156b15eae68556763 (patch)
treeb47af277ec57efde5794acdab748fc14d38cf6a8 /MgaRepo/rpmutil.py
parentb42652d28cd89cf646eaaf0b05c83766b4663a8d (diff)
downloadmgarepo-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.py10
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