Changeset 112:add49a6ccb8c in livinglogic.python.orasql

Show
Ignore:
Timestamp:
05/15/06 14:18:22 (13 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Add import.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • scripts/oracreate.py

    r101 r112  
    1515 
    1616 
    17 c4warning = astyle.Style.fromenv("LL_ORASQL_REPRANSI_WARNING", "red:black") 
    18 c4error = astyle.Style.fromenv("LL_ORASQL_REPRANSI_ERROR", "red:black") 
    19 c4connectstring = astyle.Style.fromenv("LL_ORASQL_REPRANSI_CONNECTSTRING", "green:black") 
    20 c4definition = astyle.Style.fromenv("LL_ORASQL_REPRANSI_DEFINITION", "blue:black") 
     17s4warning = astyle.Style.fromenv("LL_ORASQL_REPRANSI_WARNING", "red:black") 
     18s4error = astyle.Style.fromenv("LL_ORASQL_REPRANSI_ERROR", "red:black") 
     19s4connectstring = astyle.Style.fromenv("LL_ORASQL_REPRANSI_CONNECTSTRING", "green:black") 
     20s4definition = astyle.Style.fromenv("LL_ORASQL_REPRANSI_DEFINITION", "blue:black") 
    2121 
    2222 
     
    5454        term = True 
    5555 
    56     cs1 = c4connectstring(cursor.connection.connectstring()) 
     56    cs1 = s4connectstring(cursor.connection.connectstring()) 
    5757    if options.execute: 
    58         cs2 = c4connectstring(cursor2.connection.connectstring()) 
     58        cs2 = s4connectstring(cursor2.connection.connectstring()) 
    5959 
    6060    for (i, definition) in enumerate(connection.iterobjects(mode="create", schema="own")): 
     
    6565            else: 
    6666                msg = astyle.default("oracreate.py: ", cs1, " fetching #%d" % (i+1)) 
    67             msg = astyle.default(msg, " ", c4definition(repr(definition))) 
     67            msg = astyle.default(msg, " ", s4definition(repr(definition))) 
    6868            if not keep: 
    69                 msg = astyle.default(msg, " ", c4warning("(skipped)")) 
     69                msg = astyle.default(msg, " ", s4warning("(skipped)")) 
    7070            stderr.writeln(msg) 
    7171        if keep: 
     
    7878                        if not options.ignore or "ORA-01013" in str(exc): 
    7979                            raise 
    80                         stderr.writeln("oracreate.py: ", c4error("%s: %s" % (exc.__class__.__name__, str(exc).strip()))) 
     80                        stderr.writeln("oracreate.py: ", s4error("%s: %s" % (exc.__class__.__name__, str(exc).strip()))) 
    8181                else: 
    8282                    stdout.writeln(ddl)