[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][ftp-team/dak][master] 3 commits: examine_package: gracefully handle missing lintian



Title: GitLab

Joerg Jaspert pushed to branch master at Debian FTP Team / dak

Commits:

2 changed files:

Changes:

  • dak/examine_package.py
    ... ... @@ -126,7 +126,9 @@ ansi_colours = {
    126 126
         'end': "\033[0m",
    
    127 127
         'bold': "\033[1m",
    
    128 128
         'maintainer': "\033[32m",
    
    129
    -    'distro': "\033[1m\033[41m"}
    
    129
    +    'distro': "\033[1m\033[41m",
    
    130
    +    'error': "\033[1m\033[41m",
    
    131
    +    }
    
    130 132
     
    
    131 133
     html_colours = {
    
    132 134
         'main': ('<span style="color: green">', "</span>"),
    
    ... ... @@ -136,7 +138,9 @@ html_colours = {
    136 138
         'arch': ('<span style="color: green">', "</span>"),
    
    137 139
         'bold': ('<span style="font-weight: bold">', "</span>"),
    
    138 140
         'maintainer': ('<span style="color: green">', "</span>"),
    
    139
    -    'distro': ('<span style="font-weight: bold; background-color: red">', "</span>")}
    
    141
    +    'distro': ('<span style="font-weight: bold; background-color: red">', "</span>"),
    
    142
    +    'error': ('<span style="font-weight: bold; background-color: red">', "</span>"),
    
    143
    +    }
    
    140 144
     
    
    141 145
     
    
    142 146
     def colour_output(s, colour):
    
    ... ... @@ -505,7 +509,10 @@ def do_lintian(filename):
    505 509
     
    
    506 510
         cmd.extend(['lintian', '--show-overrides', '--color', color, "--", filename])
    
    507 511
     
    
    508
    -    return do_command(cmd, escaped=True)
    
    512
    +    try:
    
    513
    +        return do_command(cmd, escaped=True)
    
    514
    +    except OSError as e:
    
    515
    +        return (colour_output("Running lintian failed: %s" % (e), "error"))
    
    509 516
     
    
    510 517
     
    
    511 518
     def extract_one_file_from_deb(deb_filename, match):
    

  • dak/process_new.py
    ... ... @@ -393,7 +393,7 @@ def check_pkg(upload, upload_copy, session):
    393 393
         except KeyboardInterrupt:
    
    394 394
             utils.warn("[examine_package] Caught C-c; skipping.")
    
    395 395
         finally:
    
    396
    -        less_process.wait()
    
    396
    +        less_process.communicate()
    
    397 397
             sys.stdout = save_stdout
    
    398 398
     
    
    399 399
     ################################################################################
    


  • Reply to: