Don't try access source before it's filled
authorGuido Günther <agx@sigxcpu.org>
Sat, 13 Apr 2013 17:36:04 +0000 (19:36 +0200)
committerGuido Günther <agx@sigxcpu.org>
Sat, 13 Apr 2013 17:36:04 +0000 (19:36 +0200)
gbp/scripts/buildpackage.py

index 13f7bf5..07153e8 100755 (executable)
@@ -587,9 +587,9 @@ def main(argv):
         if options.export_dir and options.purge and not retval:
             RemoveTree(export_dir)()
 
-        if source.changelog and not gbp.notifications.notify(source.changelog,
-                                                             not retval,
-                                                             options.notify):
+        if source and not gbp.notifications.notify(source.changelog,
+                                                   not retval,
+                                                   options.notify):
             gbp.log.err("Failed to send notification")
             retval = 1