Permalink
Browse files

change parameter name 'f' to 'file'

  • Loading branch information...
1 parent d06cd68 commit af10bdf9505f09afa019a35f998427c5e4ee444d @nakagami committed Apr 9, 2011
Showing with 16 additions and 16 deletions.
  1. +16 −16 firebirdsql/fbcore.py
View
@@ -1242,13 +1242,13 @@ def __init__(self, dsn=None, user=None, password=None, host=None,
(h, oid, buf) = self._op_response()
self.db_handle = h
- def backup_database(self, backup_filename, f=None):
+ def backup_database(self, backup_filename, file=None):
spb = bs([isc_action_svc_backup])
s = self.str_to_bytes(self.filename)
spb += bs([isc_spb_dbname]) + int_to_bytes(len(s), 2) + s
s = self.str_to_bytes(backup_filename)
spb += bs([isc_spb_bkp_file]) + int_to_bytes(len(s), 2) + s
- if f:
+ if file:
spb += bs([isc_spb_verbose])
self._op_service_start(spb)
(h, oid, buf) = self._op_response()
@@ -1259,15 +1259,15 @@ def backup_database(self, backup_filename, f=None):
if buf[:4] == bs([0x3e,0x00,0x00,0x01]):
break
ln = bytes_to_int(buf[1:2])
- (f if f else sys.stdout).write(self.bytes_to_str(buf[3:3+ln]))
+ (file if file else sys.stdout).write(self.bytes_to_str(buf[3:3+ln]))
- def restore_database(self, restore_filename, f=None):
+ def restore_database(self, restore_filename, file=None):
spb = bs([isc_action_svc_restore])
s = self.str_to_bytes(restore_filename)
spb += bs([isc_spb_bkp_file]) + int_to_bytes(len(s), 2) + s
s = self.str_to_bytes(self.filename)
spb += bs([isc_spb_dbname]) + int_to_bytes(len(s), 2) + s
- if f:
+ if file:
spb += bs([isc_spb_verbose])
spb += bs([isc_spb_res_buffers,0x00,0x08,0x00,0x00,isc_spb_res_page_size,0x00,0x10,0x00,0x00,isc_spb_options,0x00,0x30,0x00,0x00])
self._op_service_start(spb)
@@ -1279,9 +1279,9 @@ def restore_database(self, restore_filename, f=None):
if buf[:4] == bs([0x3e,0x00,0x00,0x01]):
break
ln = bytes_to_int(buf[1:2])
- (f if f else sys.stdout).write(self.bytes_to_str(buf[3:3+ln]))
+ (file if file else sys.stdout).write(self.bytes_to_str(buf[3:3+ln]))
- def trace_start(self, name=None, cfg=None, f=None):
+ def trace_start(self, name=None, cfg=None, file=None):
spb = bs([isc_action_svc_trace_start])
if name:
s = self.str_to_bytes(name)
@@ -1296,9 +1296,9 @@ def trace_start(self, name=None, cfg=None, f=None):
self._op_service_info(bs([0x02]), bs([0x3e]))
(h, oid, buf) = self._op_response()
ln = bytes_to_int(buf[1:2])
- (f if f else sys.stdout).write(self.bytes_to_str(buf[3:3+ln]))
+ (file if file else sys.stdout).write(self.bytes_to_str(buf[3:3+ln]))
- def trace_stop(self, id, f=None):
+ def trace_stop(self, id, file=None):
spb = bs([isc_action_svc_trace_stop])
spb += bs([isc_spb_trc_id]) + int_to_bytes(id, 4)
self._op_service_start(spb)
@@ -1308,9 +1308,9 @@ def trace_stop(self, id, f=None):
self._op_service_info(bs([0x02]), bs([0x3e]))
(h, oid, buf) = self._op_response()
ln = bytes_to_int(buf[1:2])
- (f if f else sys.stdout).write(self.bytes_to_str(buf[3:3+ln]))
+ (file if file else sys.stdout).write(self.bytes_to_str(buf[3:3+ln]))
- def trace_suspend(self, id, f=None):
+ def trace_suspend(self, id, file=None):
spb = bs([isc_action_svc_trace_suspned])
spb += bs([isc_spb_trc_id]) + int_to_bytes(id, 4)
self._op_service_start(spb)
@@ -1320,9 +1320,9 @@ def trace_suspend(self, id, f=None):
self._op_service_info(bs([0x02]), bs([0x3e]))
(h, oid, buf) = self._op_response()
ln = bytes_to_int(buf[1:2])
- (f if f else sys.stdout).write(self.bytes_to_str(buf[3:3+ln]))
+ (file if file else sys.stdout).write(self.bytes_to_str(buf[3:3+ln]))
- def trace_resume(self, id, f=None):
+ def trace_resume(self, id, file=None):
spb = bs([isc_action_svc_trace_resume])
spb += bs([isc_spb_trc_id]) + int_to_bytes(id, 4)
self._op_service_start(spb)
@@ -1332,9 +1332,9 @@ def trace_resume(self, id, f=None):
self._op_service_info(bs([0x02]), bs([0x3e]))
(h, oid, buf) = self._op_response()
ln = bytes_to_int(buf[1:2])
- (f if f else sys.stdout).write(self.bytes_to_str(buf[3:3+ln]))
+ (file if file else sys.stdout).write(self.bytes_to_str(buf[3:3+ln]))
- def trace_list(self, f=None):
+ def trace_list(self, file=None):
spb = bs([isc_action_svc_trace_list])
self._op_service_start(spb)
(h, oid, buf) = self._op_response()
@@ -1345,7 +1345,7 @@ def trace_list(self, f=None):
if buf[:4] == bs([0x3e,0x00,0x00,0x01]):
break
ln = bytes_to_int(buf[1:2])
- (f if f else sys.stdout).write(self.bytes_to_str(buf[3:3+ln]))
+ (file if file else sys.stdout).write(self.bytes_to_str(buf[3:3+ln]))
def close(self):
if not hasattr(self, "db_handle"):

0 comments on commit af10bdf

Please sign in to comment.