~bmerry/duplicity/pydrive-regular

« back to all changes in this revision

Viewing changes to duplicity/backends/webdavbackend.py

  • Committer: Michael Terry
  • Date: 2014-04-17 20:50:57 UTC
  • mto: This revision was merged to the branch mainline in revision 975.
  • Revision ID: michael.terry@canonical.com-20140417205057-4cxo1yebh0oer02a
Solve except 2to3 fix

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
        def request(self, *args, **kwargs):
97
97
            try:
98
98
                return httplib.HTTPSConnection.request(self, *args, **kwargs)
99
 
            except ssl.SSLError, e:
 
99
            except ssl.SSLError as e:
100
100
                # encapsulate ssl errors
101
101
                raise BackendException("SSL failed: %s" % str(e),log.ErrorCode.backend_error)
102
102
 
293
293
                if filename:
294
294
                    result.append(filename)
295
295
            return result
296
 
        except Exception, e:
 
296
        except Exception as e:
297
297
            raise e
298
298
        finally:
299
299
            if response: response.close()
383
383
                reason = response.reason
384
384
                response.close()
385
385
                raise BackendException("Bad status code %s reason %s." % (status,reason))
386
 
        except Exception, e:
 
386
        except Exception as e:
387
387
            raise e
388
388
        finally:
389
389
            if response: response.close()
407
407
                reason = response.reason
408
408
                response.close()
409
409
                raise BackendException("Bad status code %s reason %s." % (status,reason))
410
 
        except Exception, e:
 
410
        except Exception as e:
411
411
            raise e
412
412
        finally:
413
413
            if response: response.close()
429
429
                    reason = response.reason
430
430
                    response.close()
431
431
                    raise BackendException("Bad status code %s reason %s." % (status,reason))
432
 
            except Exception, e:
 
432
            except Exception as e:
433
433
                raise e
434
434
            finally:
435
435
                if response: response.close()