rtl_locale_list = ['fa_IR'] # left to right languages ltr_locale_list = ['en_US', 'zh_CN', 'fr_FR'] if locale in rtl_locale_list: persepolis_setting.setValue('ui_direction', 'rtl') else: persepolis_setting.setValue('ui_direction', 'ltr') # compatibility persepolis_version = float(persepolis_setting.value('version/version', 2.5)) if persepolis_version < 2.6: from persepolis.scripts.compatibility import compatibility try: compatibility() except Exception as e: # create an object for PersepolisDB persepolis_db = PersepolisDB() # create tables persepolis_db.resetDataBase() # close connections persepolis_db.closeConnections() # write error in log logger.sendToLog( "compatibility ERROR!", "ERROR") logger.sendToLog(
rtl_locale_list = ['fa_IR'] # left to right languages ltr_locale_list = ['en_US', 'zh_CN', 'fr_FR'] if locale in rtl_locale_list: persepolis_setting.setValue('ui_direction', 'rtl') else: persepolis_setting.setValue('ui_direction', 'ltr') # compatibility persepolis_version = float(persepolis_setting.value('version/version', 2.5)) if persepolis_version < 2.6: from persepolis.scripts.compatibility import compatibility try: compatibility() except Exception as e: # create an object for PersepolisDB persepolis_db = PersepolisDB() # create tables persepolis_db.resetDataBase() # close connections persepolis_db.closeConnections() # write error in log logger.sendToLog( "compatibility ERROR!", "ERROR") logger.sendToLog(