Corrected dashboard script error.
BUG= Review URL: https://webrtc-codereview.appspot.com/1187004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3657 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -118,17 +118,17 @@ class DashboardConnection:
|
|||||||
def _read_consumer_secret(self, filename):
|
def _read_consumer_secret(self, filename):
|
||||||
return self._read_shelve(filename, 'consumer_secret')
|
return self._read_shelve(filename, 'consumer_secret')
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _read_shelve(filename, key):
|
||||||
|
input_file = shelve.open(filename)
|
||||||
|
|
||||||
def _read_shelve(filename, key):
|
if not input_file.has_key(key):
|
||||||
input_file = shelve.open(filename)
|
raise FailedToReadRequiredInputFile('Missing correct %s file in current '
|
||||||
|
'directory. You may have to run '
|
||||||
|
'request_oauth_permission.py.' %
|
||||||
|
filename)
|
||||||
|
|
||||||
if not input_file.has_key(key):
|
result = input_file[key]
|
||||||
raise FailedToReadRequiredInputFile('Missing correct %s file in current '
|
input_file.close()
|
||||||
'directory. You may have to run '
|
|
||||||
'request_oauth_permission.py.' %
|
|
||||||
filename)
|
|
||||||
|
|
||||||
result = input_file[key]
|
return result
|
||||||
input_file.close()
|
|
||||||
|
|
||||||
return result
|
|
||||||
|
Reference in New Issue
Block a user