If this utility is run as ./ceph-brag.py -v, it would throw an exception when we try to access sys.argv[1] == 'update-metadata' below. 
I suggest we shall move this above line 328, and add if len(sys.argv) > 1 along with this condition.