From 6329d117e0300e9f2782c02866270c04cca2d44b Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sat, 4 Oct 2014 22:57:22 +0300
Subject: [PATCH] Improved handling of missing files

---
 debian/changelog | 17 +++++++++++++----
 fabfile.py       |  1 +
 source/dcp.py    |  4 ++--
 3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a4b6538..c7d75f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,17 +1,26 @@
-dcpman (0.1.5) unstable; urgency=medium
+dcpman (0.1.7) unstable; urgency=medium
 
-  * Tagged debian/0.1.4
-  * 	modified:   debian/changelog 	modified:   fabfile.py
-  * Now logs exception as well.
+  * Release new version.
+
+ -- Adar Nimrod <nimrod@nimrod.private>  Thu, 02 Oct 2014 14:13:56 +0300
+
+dcpman (0.1.6) unstable; urgency=medium
 
   * Now logs exception as well.
   * Added simple search and parsing for CPLs (ID and issue date).
 
+ -- Adar Nimrod <nimrod@nimrod.private>  Thu, 02 Oct 2014 14:10:38 +0300
+
+dcpman (0.1.5) unstable; urgency=medium
+
+  * Now logs exception as well.
+
  -- Adar Nimrod <nimrod@nimrod.private>  Thu, 02 Oct 2014 14:09:29 +0300
 
 dcpman (0.1.4) unstable; urgency=medium
 
   * Tagged debian/0.1.4
+  * 	modified:   debian/changelog 	modified:   fabfile.py
 
  -- Adar Nimrod <nimrod@shore.co.il>  Thu, 25 Sep 2014 15:10:18 +0300
 
diff --git a/fabfile.py b/fabfile.py
index 712a616..4f4827d 100644
--- a/fabfile.py
+++ b/fabfile.py
@@ -3,6 +3,7 @@ from fabric.api import task, local, settings
 
 @task
 def publish ():
+    local ('git dch -R')
     build ()
     for dist in ['wheezy', 'jessie', 'sid']:
          local ('''reprepro includedeb ''' + dist + ''' ../dcpman_*.deb''')
diff --git a/source/dcp.py b/source/dcp.py
index 7139bb5..d945f61 100755
--- a/source/dcp.py
+++ b/source/dcp.py
@@ -2,7 +2,7 @@
 from hashlib import sha1
 from base64 import b64encode
 from os import stat, listdir, mkdir, statvfs
-from os.path import isdir, basename
+from os.path import isdir, basename,exists
 from shutil import copyfile
 from xml.dom.minidom import parse
 import sys
@@ -13,7 +13,7 @@ class Asset (object):
     def verifySize (self):
         '''verify that the size of the file is correct, if present.'''
         try:
-            return stat (self.fullpath).st_size == self.size
+            return exists (self.fullpath) and stat (self.fullpath).st_size == self.size
         except AttributeError:
             return True
     
-- 
GitLab