~james-w/udd/management-commands

« back to all changes in this revision

Viewing changes to udd/icommon.py

  • Committer: Vincent Ladeuil
  • Date: 2011-10-27 10:14:50 UTC
  • Revision ID: v.ladeuil+lp@free.fr-20111027101450-tejmkm8butk633r7
refresh_possible_transports *relies* on catching errors.NoSuchFile when the transport is valid.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1651
1651
    for t in possible_transports:
1652
1652
        try:
1653
1653
            t.has('file-that-does-not-exist')
 
1654
        except errors.NoSuchFile:
 
1655
            # That's the expected exception, the transport is valid
 
1656
            pass
1654
1657
        except errors.TooManyConcurrentRequests:
1655
1658
            mutter(
1656
1659
                "refresh_possible_transports encountered a smart "