aboutsummaryrefslogtreecommitdiffstats
path: root/create-srpm
diff options
context:
space:
mode:
authorBogdano Arendartchuk <bogdano@mandriva.org>2007-03-14 22:15:00 +0000
committerBogdano Arendartchuk <bogdano@mandriva.org>2007-03-14 22:15:00 +0000
commit215990c8e99fd698d3231aae2bd67ac914a21065 (patch)
tree550e5430fb91938a74e40bdc67cd8db121976873 /create-srpm
parenteecfb31ec9d42d37c71ecbe92c5a51bee156dc11 (diff)
downloadmgarepo-215990c8e99fd698d3231aae2bd67ac914a21065.tar
mgarepo-215990c8e99fd698d3231aae2bd67ac914a21065.tar.gz
mgarepo-215990c8e99fd698d3231aae2bd67ac914a21065.tar.bz2
mgarepo-215990c8e99fd698d3231aae2bd67ac914a21065.tar.xz
mgarepo-215990c8e99fd698d3231aae2bd67ac914a21065.zip
Make create-srpm check if the temporary package still exists before trying
to remove it.
Diffstat (limited to 'create-srpm')
-rwxr-xr-xcreate-srpm3
1 files changed, 2 insertions, 1 deletions
diff --git a/create-srpm b/create-srpm
index 5223d45..83a4153 100755
--- a/create-srpm
+++ b/create-srpm
@@ -66,7 +66,8 @@ class CmdIface:
upload_command.append(targetsrpms[0])
status, output = execcmd(" ".join(upload_command),
noerror=1)
- os.unlink(targetsrpms[0])
+ if os.path.isfile(targetsrpms[0]):
+ os.unlink(targetsrpms[0])
if status != 0:
raise CmdError, "Failed to upload %s:\n%s" % (packageurl, output)
return 1