@@ -69,14 +69,14 @@ def install(app_id, enable=True, tries=3, wait=10):
69
69
except sqlite3 .Error as exc :
70
70
if "attempt to write a readonly database" not in str (exc ):
71
71
raise CommandExecutionError (
72
- "Error installing app({}): {}" . format ( app_id , exc )
72
+ f "Error installing app({ app_id } ): { exc } "
73
73
)
74
74
elif num_tries < tries :
75
75
time .sleep (wait )
76
76
num_tries += 1
77
77
else :
78
78
raise CommandExecutionError (
79
- "Error installing app({}): {}" . format ( app_id , exc )
79
+ f "Error installing app({ app_id } ): { exc } "
80
80
)
81
81
82
82
@@ -100,7 +100,7 @@ def installed(app_id):
100
100
return db .installed (app_id )
101
101
except sqlite3 .Error as exc :
102
102
raise CommandExecutionError (
103
- "Error checking if app({}) is installed: {}" . format ( app_id , exc )
103
+ f "Error checking if app({ app_id } ) is installed: { exc } "
104
104
)
105
105
106
106
@@ -129,7 +129,7 @@ def enable_(app_id, enabled=True):
129
129
return db .disable (app_id )
130
130
except sqlite3 .Error as exc :
131
131
raise CommandExecutionError (
132
- "Error setting enable to {} on app({}): {}" . format ( enabled , app_id , exc )
132
+ f "Error setting enable to { enabled } on app({ app_id } ): { exc } "
133
133
)
134
134
135
135
@@ -153,7 +153,7 @@ def enabled(app_id):
153
153
return db .enabled (app_id )
154
154
except sqlite3 .Error as exc :
155
155
raise CommandExecutionError (
156
- "Error checking if app({}) is enabled: {}" . format ( app_id , exc )
156
+ f "Error checking if app({ app_id } ) is enabled: { exc } "
157
157
)
158
158
159
159
@@ -175,9 +175,7 @@ def remove(app_id):
175
175
try :
176
176
return db .remove (app_id )
177
177
except sqlite3 .Error as exc :
178
- raise CommandExecutionError (
179
- "Error removing app({}): {}" .format (app_id , exc )
180
- )
178
+ raise CommandExecutionError (f"Error removing app({ app_id } ): { exc } " )
181
179
182
180
183
181
class TccDB :
@@ -205,7 +203,7 @@ def _check_table_digest(self):
205
203
self .ge_bigsur_and_later = True
206
204
else :
207
205
raise CommandExecutionError (
208
- "TCC Database structure unknown for digest '{}'" . format ( digest )
206
+ f "TCC Database structure unknown for digest '{ digest } '"
209
207
)
210
208
211
209
def _get_client_type (self , app_id ):
0 commit comments