Changeset 972993c


Ignore:
Timestamp:
Feb 21, 2014 10:07:11 AM (5 years ago)
Author:
Ted Faber <faber@…>
Branches:
master
Children:
f1f9aec
Parents:
5726f53
Message:

Deal with unspecified external_networks file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/desktop_access.py

    rae714e4 r972993c  
    417417            print >>f, 'hostname %s' % my_name
    418418            print >>f, 'interface tap0'
    419             try:
    420                 extern = open(self.external_networks, 'r')
    421                 if extern is not None:
    422                     for l in extern:
    423                         print >>f, "%s" % l.strip()
    424                     extern.close()
    425             except EnvironmentError:
    426                 # No external_networks or problem reading it, ignore
    427                 pass
     419            if  self.external_networks is not None:
     420                try:
     421                    extern = open(self.external_networks, 'r')
     422                    if extern is not None:
     423                        for l in extern:
     424                            print >>f, "%s" % l.strip()
     425                        extern.close()
     426                except EnvironmentError:
     427                    # No external_networks or problem reading it, ignore
     428                    pass
    428429            f.close()
    429430            os.chmod(zebra_conf, 0644)
Note: See TracChangeset for help on using the changeset viewer.