Modify

Opened 9 years ago

Closed 9 years ago

Last modified 6 years ago

#3148 closed enhancement (fixed)

[PATCH] Create main() function so script can be called from python modules

Reported by: alberto@… Owned by: John Hampton
Priority: normal Component: SqliteToPgScript
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

Attached is a patch that creates a main() function entry point so the script can be easily called programatically from other python modules.

It also "fixes" some accesses to global variable "opts" instead of instance attribute inside MigrateTable which have surfaced when opts is no longer declared in module scope.

Alberto

Attachments (1)

main_ep.diff (1.8 KB) - added by alberto@… 9 years ago.
The patch

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by alberto@…

Attachment: main_ep.diff added

The patch

comment:1 Changed 9 years ago by John Hampton

Resolution: fixed
Status: newclosed

(In [3826])

  • Accepted patch to create a main() function that is easily callable from other python modules. Thanks to alberto Closes #3148
  • Accepted patch to check for presence of arguments before checking value. Closes #3138

Modify Ticket

Action
as closed The owner will remain John Hampton.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.