update_payload: Fix problem with signature size on unsigned payloads

If the payload is unsigned (e.g. for test image), then the checker.sigs_file
would not exist. So check for that variable before using it.

BUG=chromium:794404
BUG=chromium:914705
TEST=manually signing the payload ran update_payload_check with signed and
unsigned image
TEST=unittests

Change-Id: I871137eadef00d012ee926d12fd4eee36a454487
Reviewed-on: https://chromium-review.googlesource.com/1375023
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Sen Jiang <senj@chromium.org>
diff --git a/scripts/update_payload/checker.py b/scripts/update_payload/checker.py
index 7a319f7..15f11ae 100644
--- a/scripts/update_payload/checker.py
+++ b/scripts/update_payload/checker.py
@@ -1397,7 +1397,8 @@
       used_payload_size = self.payload.data_offset + total_blob_size
       # Major versions 2 and higher have a signature at the end, so it should be
       # considered in the total size of the image.
-      if self.major_version >= common.BRILLO_MAJOR_PAYLOAD_VERSION:
+      if (self.major_version >= common.BRILLO_MAJOR_PAYLOAD_VERSION and
+          self.sigs_size):
         used_payload_size += self.sigs_size
 
       if used_payload_size != payload_file_size: