@@ 113-125 (lines=13) @@ | ||
110 | printM('Starting.', self.sender) |
|
111 | ||
112 | ||
113 | def _resolve_extra_text(self, extra_text): |
|
114 | allowable_len = 103 # length of string allowable given maximum message text & region |
|
115 | if ((extra_text == '') or (extra_text == None) or (extra_text == False)): |
|
116 | self.extra_text = '' |
|
117 | else: |
|
118 | extra_text = str(extra_text) |
|
119 | len_ex_txt = len(extra_text) |
|
120 | ||
121 | if len_ex_txt > allowable_len: |
|
122 | printW('extra_text parameter is longer than allowable (%s chars) and will be truncated. Please keep extra_text at or below %s characters.' % (len_ex_txt, allowable_len), sender=self.sender) |
|
123 | extra_text = extra_text[:allowable_len] |
|
124 | ||
125 | self.extra_text = ' %s' % (extra_text) |
|
126 | ||
127 | ||
128 | def auth(self): |
@@ 71-83 (lines=13) @@ | ||
68 | printM('Starting.', self.sender) |
|
69 | ||
70 | ||
71 | def _resolve_extra_text(self, extra_text): |
|
72 | allowable_len = 4096 - (280-103) # length of string allowable given maximum message text & region |
|
73 | if ((extra_text == '') or (extra_text == None) or (extra_text == False)): |
|
74 | self.extra_text = '' |
|
75 | else: |
|
76 | extra_text = str(extra_text) |
|
77 | len_ex_txt = len(extra_text) |
|
78 | ||
79 | if len_ex_txt > allowable_len: |
|
80 | printW('extra_text parameter is longer than allowable (%s chars) and will be truncated. Please keep extra_text at or below %s characters.' % (len_ex_txt, allowable_len), sender=self.sender) |
|
81 | extra_text = extra_text[:allowable_len] |
|
82 | ||
83 | self.extra_text = ' %s' % (extra_text) |
|
84 | ||
85 | ||
86 | def auth(self): |