#77 Exit with message if unable to look for file
Merged a year ago by tdawson. Opened a year ago by tdawson.
centos/ tdawson/centpkg lookaside-message  into  develop

file modified
+9 -1
@@ -97,8 +97,16 @@ 

          """

          _name = utils.get_repo_name(name) if is_dist_git(os.getcwd()) else name

  

-         return super(StreamLookasideCache, self).remote_file_exists(

+         try:

+             status = super(StreamLookasideCache, self).remote_file_exists(

                  _name, filename, hashstr)

+         except UploadError as e:

+             self.log.info('Error checking for %s at %s'

+                           % (filename, self.upload_url))

+             self.log.info(e)

+             raise SystemExit

+ 

+         return status

  

      def upload(self, name, filename, hashstr, offline=False):

          """

Right now, if remote_file_exists has an SSL failure, nothing catches the exception and the end user does not get any info.
This exits out fairly quickly and gives information on why it exited.

rebased onto af648d3

a year ago

Pull-Request has been merged by tdawson

a year ago
Metadata