~jibel/ubuntu/bionic/apport/lp1582950_2_ubiquity_hook

« back to all changes in this revision

Viewing changes to data/apport

  • Committer: Brian Murray
  • Date: 2017-12-13 18:06:40 UTC
  • Revision ID: brian@canonical.com-20171213180640-x1884k2bq1tzool7
data/apport: add a second os.path.exists check to ensure we do not
receive a Traceback in is_container_id(). (LP: #1733366)

Show diffs side-by-side

added added

removed removed

Lines of Context:
298
298
 
299
299
 
300
300
def is_same_ns(pid, ns):
301
 
    if not os.path.exists('/proc/self/ns/%s' % ns):
 
301
    if not os.path.exists('/proc/self/ns/%s' % ns) or \
 
302
            not os.path.exists('/proc/%s/ns/%s' % (pid, ns)):
302
303
        # If the namespace doesn't exist, then it's obviously shared
303
304
        return True
304
305