File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 8888# See documentation for paper types, there quite a few.
8989shipment .RequestedShipment .LabelSpecification .LabelStockType = 'PAPER_7X4.75'
9090
91- # This indicates if the top or bottom of the label comes out of the
92- # printer first.
93- # BOTTOM_EDGE_OF_TEXT_FIRST or TOP_EDGE_OF_TEXT_FIRST
9491# Timestamp in YYYY-MM-DDThh:mm:ss format, e.g. 2002-05-30T09:00:00
9592shipment .RequestedShipment .ShipTimestamp = datetime .datetime .now ().replace (microsecond = 0 ).isoformat ()
9693
97- # BOTTOM_EDGE_OF_TEXT_FIRST, TOP_EDGE_OF_TEXT_FIRST
94+ # This indicates if the top or bottom of the label comes out of the
95+ # printer first.
96+ # BOTTOM_EDGE_OF_TEXT_FIRST or TOP_EDGE_OF_TEXT_FIRST
9897shipment .RequestedShipment .LabelSpecification .LabelPrintingOrientation = 'TOP_EDGE_OF_TEXT_FIRST'
9998
10099# Delete the flags we don't want.
Original file line number Diff line number Diff line change 6666 print ("Tracking #: {}" .format (match .TrackingNumber ))
6767 if hasattr (match , 'TrackingNumberUniqueIdentifier' ):
6868 print ("Tracking # UniqueID: {}" .format (match .TrackingNumberUniqueIdentifier ))
69- if hasattr (match , 'StatusDetail.Description' ):
70- print ("Status Description: {}" .format (match .StatusDetail .Description ))
71- if hasattr (match , 'StatusDetail.AncillaryDetails' ):
72- print ("Status AncillaryDetails Reason: {}" .format (match .StatusDetail .AncillaryDetails [- 1 ].Reason ))
73- print ("Status AncillaryDetails Description: {}"
74- "" .format (match .StatusDetail .AncillaryDetails [- 1 ].ReasonDescription ))
69+ if hasattr (match , 'StatusDetail' ):
70+ if hasattr (getattr (match , 'StatusDetail' ), 'Description' ):
71+ print ("Status Description: {}" .format (match .StatusDetail .Description ))
72+ if hasattr (getattr (match , 'StatusDetail' ), 'AncillaryDetails' ):
73+ print ("Status AncillaryDetails Reason: {}" .format (match .StatusDetail .AncillaryDetails [- 1 ].Reason ))
74+ print ("Status AncillaryDetails Description: {}"
75+ "" .format (match .StatusDetail .AncillaryDetails [- 1 ].ReasonDescription ))
7576 if hasattr (match , 'ServiceCommitMessage' ):
7677 print ("Commit Message: {}" .format (match .ServiceCommitMessage ))
7778 if hasattr (match , 'Notification' ):
You can’t perform that action at this time.
0 commit comments