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