~nataliabidart/software-center/lost-in-translation

« back to all changes in this revision

Viewing changes to utils/submit_review_gtk3.py

  • Committer: Kiwinote
  • Date: 2012-03-15 22:36:31 UTC
  • mfrom: (2867 trunk)
  • mto: This revision was merged to the branch mainline in revision 2881.
  • Revision ID: kiwinote@gmail.com-20120315223631-lvea6t5sydpkkqni
mergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
    parser = OptionParser()
70
70
    parser.add_option("", "--datadir", default=default_datadir)
71
71
 
72
 
    logfile_path = os.path.join(SOFTWARE_CENTER_CACHE_DIR, "reviews-helper.log")
73
 
    logfile_handler = logging.handlers.RotatingFileHandler(logfile_path,
74
 
                                                           maxBytes=100*1000,
75
 
                                                           backupCount=5)
 
72
    logfile_path = os.path.join(
 
73
        SOFTWARE_CENTER_CACHE_DIR, "reviews-helper.log")
 
74
    logfile_handler = logging.handlers.RotatingFileHandler(
 
75
        logfile_path, maxBytes = 100 * 1000, backupCount = 5)
76
76
    logfile_handler.setLevel(logging.INFO)
77
77
    logging.getLogger().addHandler(logfile_handler)
78
78
    logging.getLogger().addHandler(logging.StreamHandler())
103
103
 
104
104
        if not (options.pkgname and options.version):
105
105
            parser.error(_("Missing arguments"))
106
 
    
 
106
 
107
107
        if options.debug:
108
 
            logging.basicConfig(level=logging.DEBUG)                        
 
108
            logging.basicConfig(level=logging.DEBUG)
109
109
 
110
110
        # personality
111
111
        logging.debug("submit_review mode")
113
113
        # initialize and run
114
114
        theapp = Application(options.appname, options.pkgname)
115
115
        review_app = SubmitReviewsApp(datadir=options.datadir,
116
 
                                      app=theapp, 
 
116
                                      app=theapp,
117
117
                                      parent_xid=options.parent_xid,
118
118
                                      iconname=options.iconname,
119
119
                                      origin=options.origin,
120
120
                                      version=options.version)
121
121
        review_app.run()
122
122
 
123
 
 
124
123
    # run "report" personality
125
124
    if "report_review" in sys.argv[0]:
126
125
        # check options
134
133
 
135
134
        if not (options.review_id):
136
135
            parser.error(_("Missing review-id arguments"))
137
 
    
 
136
 
138
137
        if options.debug:
139
138
            logging.basicConfig(level=logging.DEBUG)                        
140
139