@@ -331,7 +331,7 @@ def connect(self, empty_sqlite_db=False):
331331 self .connectionInfo [connID ] = (p .db_host , p .db_user ,
332332 (p .db_passwd or None ), p .db_name )
333333 logging .debug ('[%s] Connected to database: %s as %s@%s' % (connID , p .db_name , p .db_user , p .db_host ))
334- if p .image_classification == 'yes ' :
334+ if p .classification_type == 'image ' :
335335 self .CreateObjectImageTable ()
336336 except DBError (), e :
337337 raise DBException , 'Failed to connect to database: %s as %s@%s (connID = "%s").\n %s' % (p .db_name , p .db_user , p .db_host , connID , e )
@@ -445,7 +445,7 @@ def regexp(expr, item):
445445 self .CreateSQLiteDB ()
446446 else :
447447 raise DBException , 'Database at %s appears to be empty.' % (p .db_sqlite_file )
448- if p .image_classification == 'yes ' :
448+ if p .classification_type == 'image ' :
449449 self .CreateObjectImageTable ()
450450 logging .debug ('[%s] Connected to database: %s' % (connID , p .db_sqlite_file ))
451451
@@ -1257,7 +1257,7 @@ def CreateSQLiteDB(self):
12571257 self .execute ('DROP TABLE IF EXISTS %s' % (p .image_table ))
12581258 self .execute (statement )
12591259
1260- if not p .image_classification == 'yes ' :
1260+ if not p .classification_type == 'image ' :
12611261 # CREATE THE OBJECT TABLE
12621262 # For the object table we assume that all values are type FLOAT
12631263 # except for the primary keys
@@ -1292,7 +1292,7 @@ def CreateSQLiteDB(self):
12921292 f .close ()
12931293
12941294 # POPULATE THE OBJECT TABLE
1295- if not p .image_classification == 'yes ' :
1295+ if not p .classification_type == 'image ' :
12961296 f = open (p .object_csv_file , 'U' )
12971297 r = csv .reader (f )
12981298 row = r .next () # skip the headers
@@ -1391,7 +1391,7 @@ def CreateSQLiteDBFromCSVs(self):
13911391 logging .info ("... loaded %d%% of CSV data" % (pct ))
13921392
13931393 line_count = 0
1394- if not p .image_classification == 'yes ' :
1394+ if not p .classification_type == 'image ' :
13951395 assert len (obcsvs )> 0 , ('Failed to parse object csv filenames from %s. '
13961396 'Make sure db_sql_file in your properties file is'
13971397 ' set to the .SQL file output by CellProfiler\' s '
0 commit comments