• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

winazurestorageのフォーク


Commit MetaInfo

修订版214010a2f8931bac9c96dfeb337d56fe084ca63b (tree)
时间2008-11-26 14:34:58
作者Steve Marx <Steve.Marx@micr...>
CommiterSteve Marx

Log Message

Add suppert for Edm.Boolean type

更改概述

差异

--- a/winazurestorage.py
+++ b/winazurestorage.py
@@ -45,6 +45,9 @@ def parse_edm_datetime(input):
4545 def parse_edm_int32(input):
4646 return int(input)
4747
48+def parse_edm_boolean(input):
49+ return input.lower() == "true"
50+
4851 class SharedKeyCredentials(object):
4952 def __init__(self, account_name, account_key, use_path_style_uris = None):
5053 self._account = account_name
@@ -153,6 +156,7 @@ class TableStorage(Storage):
153156 t = property.getAttribute('m:type')
154157 if t.lower() == 'edm.datetime': value = parse_edm_datetime(property.firstChild.data)
155158 elif t.lower() == 'edm.int32': value = parse_edm_int32(property.firstChild.data)
159+ elif t.lower() == 'edm.boolean': value = parse_edm_boolean(property.firstChild.data)
156160 else: raise Exception(t.lower())
157161 else: value = property.firstChild.data
158162 setattr(entity, key, value)