#344 Give more information when sources has invalid content
Merged 5 years ago by cqi. Opened 5 years ago by cqi.

file modified
+4 -1
@@ -66,7 +66,10 @@ 

              hash, file = stripped.split('  ', 1)

  

          except ValueError:

-             raise MalformedLineError(line)

+             raise MalformedLineError(

+                 'sources has invalid content: {0}\n'

+                 'Please note that sources file must not be modified manually.'

+                 .format(stripped))

  

          return self.entry_type('md5', file, hash)

  

Fixes #227

Signed-off-by: Chenxiong Qi cqi@redhat.com

There is no too much space to improve the code. Just show more information in the error message to tell what's wrong and warn that sources cannot be modified by hand.

Commit 5ed5cfc fixes this pull-request

Pull-Request has been merged by cqi

5 years ago

Pull-Request has been merged by cqi

5 years ago