diff options
Diffstat (limited to 'gluster/swift/common/middleware/gswauth/bin/gswauth-cleanup-tokens')
-rwxr-xr-x | gluster/swift/common/middleware/gswauth/bin/gswauth-cleanup-tokens | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gluster/swift/common/middleware/gswauth/bin/gswauth-cleanup-tokens b/gluster/swift/common/middleware/gswauth/bin/gswauth-cleanup-tokens index cc2d18d..3f3593b 100755 --- a/gluster/swift/common/middleware/gswauth/bin/gswauth-cleanup-tokens +++ b/gluster/swift/common/middleware/gswauth/bin/gswauth-cleanup-tokens @@ -20,6 +20,8 @@ except ImportError: import json import gettext import re +import socket + from datetime import datetime, timedelta from optparse import OptionParser from sys import argv, exit @@ -114,6 +116,10 @@ if __name__ == '__main__': else: exit('Object listing on container %s failed with status ' 'code %d' % (container, e.http_status)) + except socket.error, (errno, msg): + exit('Token clean-up failed: %s. ' \ + 'Check that the admin_url is valid' % msg) + if objs: marker = objs[-1]['name'] else: |