[Python-modules-commits] [python-aptly] 01/03: Import python-aptly_0.7.11.orig.tar.gz

Filip Pytloun fpytloun-guest at moszumanska.debian.org
Thu Nov 24 11:19:42 UTC 2016


This is an automated email from the git hooks/post-receive script.

fpytloun-guest pushed a commit to branch master
in repository python-aptly.

commit 1e0dfdbe36df5681f061473848537f92fc277f03
Author: Filip Pytloun <filip at pytloun.cz>
Date:   Thu Nov 24 12:14:59 2016 +0100

    Import python-aptly_0.7.11.orig.tar.gz
---
 aptly/publisher/__init__.py | 29 +++++++++++++++--------------
 setup.py                    |  2 +-
 2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/aptly/publisher/__init__.py b/aptly/publisher/__init__.py
index 38a2929..5af33f5 100644
--- a/aptly/publisher/__init__.py
+++ b/aptly/publisher/__init__.py
@@ -289,20 +289,21 @@ class Publish(object):
 
             # Look if merged snapshot doesn't already exist
             remote_snapshot = self._find_snapshot(r'^%s%s-%s-\d+' % (self.merge_prefix, self.name.replace('./', '').replace('/', '-'), component))
-            source_snapshots = self._get_source_snapshots(remote_snapshot)
-
-            # Check if latest merged snapshot has same source snapshots like us
-            snapshots_want = list(snapshots)
-            snapshots_want.sort()
-
-            lg.debug("Comparing snapshots: snapshot_name=%s, snapshot_sources=%s, wanted_sources=%s" % (remote_snapshot['Name'], source_snapshots, snapshots_want))
-            if snapshots_want == source_snapshots:
-                lg.info("Remote merge snapshot already exists: %s (%s)" % (remote_snapshot['Name'], source_snapshots))
-                self.publish_snapshots.append({
-                    'Component': component,
-                    'Name': remote_snapshot['Name']
-                })
-                continue
+            if remote_snapshot:
+                source_snapshots = self._get_source_snapshots(remote_snapshot)
+
+                # Check if latest merged snapshot has same source snapshots like us
+                snapshots_want = list(snapshots)
+                snapshots_want.sort()
+
+                lg.debug("Comparing snapshots: snapshot_name=%s, snapshot_sources=%s, wanted_sources=%s" % (remote_snapshot['Name'], source_snapshots, snapshots_want))
+                if snapshots_want == source_snapshots:
+                    lg.info("Remote merge snapshot already exists: %s (%s)" % (remote_snapshot['Name'], source_snapshots))
+                    self.publish_snapshots.append({
+                        'Component': component,
+                        'Name': remote_snapshot['Name']
+                    })
+                    continue
 
             snapshot_name = '%s%s-%s-%s' % (self.merge_prefix, self.name.replace('./', '').replace('/', '-'), component, self.timestamp)
             lg.info("Creating merge snapshot %s for component %s of snapshots %s" % (snapshot_name, component, snapshots))
diff --git a/setup.py b/setup.py
index de0f5ec..7f3731b 100755
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@ long_desc = open('README.rst').read()
 
 setup(
     name="python-aptly",
-    version="0.7.10",
+    version="0.7.11",
     description="Aptly REST API client and tooling",
     long_description=long_desc,
     author="Filip Pytloun",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-aptly.git



More information about the Python-modules-commits mailing list