diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-02-10 11:48:22 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-02-10 11:48:22 +0100 |
| commit | 3a54451998b246f94b3aa5150841e95f696d7d96 (patch) | |
| tree | 642351d3db3fae950d3cd261b5e478222c6caa06 /SoftwareProperties | |
| parent | 47bdad7c8e7c65011d6bca3bf186165195338bd4 (diff) | |
| download | python-apt-3a54451998b246f94b3aa5150841e95f696d7d96.tar.gz | |
* SoftwareProperties/aptsources.py: bugfix in is_mirror (malone #30989)
Diffstat (limited to 'SoftwareProperties')
| -rw-r--r-- | SoftwareProperties/aptsources.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/SoftwareProperties/aptsources.py b/SoftwareProperties/aptsources.py index c0d2c2ba..03459adf 100644 --- a/SoftwareProperties/aptsources.py +++ b/SoftwareProperties/aptsources.py @@ -201,8 +201,9 @@ class SourcesList: except IndexError: # ok, somethings wrong here #print "IndexError" return False - # remove the leading "<country>." and see if that helps - if compare_srv[compare_srv.index(".")+1:] == master_srv: + # remove the leading "<country>." (if any) and see if that helps + if "." in compare_srv and \ + compare_srv[compare_srv.index(".")+1:] == master_srv: #print "Mirror" return True return False |
