@@ -2033,7 +2033,7 @@ def click_pushButtonSend(self):
2033
2033
# attempt register
2034
2034
if email [- 14 :] != "@mailchuck.com" :
2035
2035
# 12 character random email address
2036
- email = '' .join (
2036
+ email = u '' .join (
2037
2037
random .SystemRandom ().choice (
2038
2038
string .ascii_lowercase
2039
2039
) for _ in range (12 )
@@ -2049,78 +2049,77 @@ def click_pushButtonSend(self):
2049
2049
" an email gateway. Sending registration"
2050
2050
" now as {0}, please wait for the registration"
2051
2051
" to be processed before retrying sending."
2052
- ).format (email )
2053
- )
2052
+ ).format (email ))
2054
2053
return
2055
2054
status , addressVersionNumber , streamNumber , ripe = \
2056
2055
decodeAddress (toAddress )
2057
2056
if status != 'success' :
2058
2057
try :
2059
- toAddress = unicode (toAddress , 'utf-8' , 'ignore' )
2058
+ toAddress_value = unicode (
2059
+ toAddress , 'utf-8' , 'ignore' )
2060
2060
except :
2061
2061
logger .warning (
2062
- "Failed unicode(toAddress ):" ,
2063
- exc_info = True )
2062
+ "Failed unicode(toAddress ):" , exc_info = True )
2064
2063
logger .error (
2065
2064
'Error: Could not decode recipient address %s: %s' ,
2066
- toAddress , status )
2065
+ toAddress_value , status )
2067
2066
2068
2067
if status == 'missingbm' :
2069
2068
self .updateStatusBar (_translate (
2070
2069
"MainWindow" ,
2071
2070
"Error: Bitmessage addresses start with"
2072
2071
" BM- Please check the recipient address {0}"
2073
- ).format (toAddress ))
2072
+ ).format (toAddress_value ))
2074
2073
elif status == 'checksumfailed' :
2075
2074
self .updateStatusBar (_translate (
2076
2075
"MainWindow" ,
2077
2076
"Error: The recipient address {0} is not"
2078
2077
" typed or copied correctly. Please check it."
2079
- ).format (toAddress ))
2078
+ ).format (toAddress_value ))
2080
2079
elif status == 'invalidcharacters' :
2081
2080
self .updateStatusBar (_translate (
2082
2081
"MainWindow" ,
2083
2082
"Error: The recipient address {0} contains"
2084
2083
" invalid characters. Please check it."
2085
- ).format (toAddress ))
2084
+ ).format (toAddress_value ))
2086
2085
elif status == 'versiontoohigh' :
2087
2086
self .updateStatusBar (_translate (
2088
2087
"MainWindow" ,
2089
2088
"Error: The version of the recipient address"
2090
2089
" {0} is too high. Either you need to upgrade"
2091
2090
" your Bitmessage software or your"
2092
2091
" acquaintance is being clever."
2093
- ).format (toAddress ))
2092
+ ).format (toAddress_value ))
2094
2093
elif status == 'ripetooshort' :
2095
2094
self .updateStatusBar (_translate (
2096
2095
"MainWindow" ,
2097
2096
"Error: Some data encoded in the recipient"
2098
2097
" address {0} is too short. There might be"
2099
2098
" something wrong with the software of"
2100
2099
" your acquaintance."
2101
- ).format (toAddress ))
2100
+ ).format (toAddress_value ))
2102
2101
elif status == 'ripetoolong' :
2103
2102
self .updateStatusBar (_translate (
2104
2103
"MainWindow" ,
2105
2104
"Error: Some data encoded in the recipient"
2106
2105
" address {0} is too long. There might be"
2107
2106
" something wrong with the software of"
2108
2107
" your acquaintance."
2109
- ).format (toAddress ))
2108
+ ).format (toAddress_value ))
2110
2109
elif status == 'varintmalformed' :
2111
2110
self .updateStatusBar (_translate (
2112
2111
"MainWindow" ,
2113
2112
"Error: Some data encoded in the recipient"
2114
2113
" address {0} is malformed. There might be"
2115
2114
" something wrong with the software of"
2116
2115
" your acquaintance."
2117
- ).format (toAddress ))
2116
+ ).format (toAddress_value ))
2118
2117
else :
2119
2118
self .updateStatusBar (_translate (
2120
2119
"MainWindow" ,
2121
2120
"Error: Something is wrong with the"
2122
2121
" recipient address {0}."
2123
- ).format (toAddress ))
2122
+ ).format (toAddress_value ))
2124
2123
elif fromAddress == '' :
2125
2124
self .updateStatusBar (_translate (
2126
2125
"MainWindow" ,
@@ -4313,6 +4312,8 @@ def tableWidgetInboxItemClicked(self):
4313
4312
except NameError :
4314
4313
message = u""
4315
4314
except IndexError :
4315
+ # _translate() often returns unicode, no redefinition here!
4316
+ # pylint: disable=redefined-variable-type
4316
4317
message = _translate (
4317
4318
"MainWindow" ,
4318
4319
"Error occurred: could not load message from disk."
0 commit comments