Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben committed Jun 6, 2010
1 parent ba38833 commit d49a73b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 26 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__all__ = [ 'UPS', 'USPS', 'endicia' ]
__all__ = [ 'UPS', 'USPS', 'endicia', 'shipping_common' ]
2 changes: 1 addition & 1 deletion endicia/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from endicia import package
from endicia import package, error
from endicia import label_request, label_response
from endicia import rate_request, rate_response
from endicia import account_status_request, account_status_response
Expand Down
6 changes: 3 additions & 3 deletions endicia/endicia.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import xml.etree.ElementTree as etree

class package(object):
types = [
shipment_types = [
'Priority',
'Express',
'First',
Expand All @@ -26,7 +26,7 @@ class package(object):
]

def __init__(self, weight_oz, shape, length, width, height, description='', value=0):
self.mail_class = self.types[0]
self.mail_class = self.shipment_types[0]
self.weight_oz = str(weight_oz)
self.shape = shape
self.dimensions = ( str(length), str(width), str(height) )
Expand Down Expand Up @@ -67,7 +67,7 @@ def __ParseResponse(self, response_text):
status = int(root.findtext(status_path))
response = None
if status != 0:
response = Error(status, root, namespace)
response = error(status, root, namespace)
else:
response = self._parse_response_body(root, namespace)
return response
Expand Down
27 changes: 6 additions & 21 deletions python-ship.tmproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
<key>firstVisibleLine</key>
<integer>254</integer>
</dict>
<key>common.py</key>
<key>endicia/__init__.py</key>
<dict>
<key>caret</key>
<dict>
<key>column</key>
<integer>26</integer>
<integer>34</integer>
<key>line</key>
<integer>29</integer>
<integer>0</integer>
</dict>
<key>firstVisibleColumn</key>
<integer>0</integer>
Expand All @@ -54,36 +54,21 @@
<key>caret</key>
<dict>
<key>column</key>
<integer>25</integer>
<key>line</key>
<integer>24</integer>
</dict>
<key>firstVisibleColumn</key>
<integer>0</integer>
<key>firstVisibleLine</key>
<integer>0</integer>
</dict>
<key>test.py</key>
<dict>
<key>caret</key>
<dict>
<key>column</key>
<integer>56</integer>
<key>line</key>
<integer>86</integer>
<integer>69</integer>
</dict>
<key>firstVisibleColumn</key>
<integer>0</integer>
<key>firstVisibleLine</key>
<integer>64</integer>
<integer>0</integer>
</dict>
</dict>
<key>openDocuments</key>
<array>
<string>USPS/USPS.py</string>
<string>endicia/endicia.py</string>
<string>test.py</string>
<string>common.py</string>
<string>endicia/__init__.py</string>
</array>
<key>showFileHierarchyDrawer</key>
<true/>
Expand Down
File renamed without changes.

0 comments on commit d49a73b

Please sign in to comment.