Beispiel #1
0
def get_profile_descr(filepath):
    """Returns profile description tuple (name, copyright, info).
    If file is not suitable profile or doesn't exist
    returns None. 
    """
    try:
        profile = libcms.cms_open_profile_from_file(filepath)
        ret = (libcms.cms_get_profile_name(profile),)
        ret += (libcms.cms_get_profile_copyright(profile),)
        ret += (libcms.cms_get_profile_info(profile),)
    except Exception:
        ret = ('', '', '')
    return ret
Beispiel #2
0
def get_profile_descr(filepath):
	"""
	Returns profile description tuple (name, copyright, info).
	If file is not suitable profile or doesn't exist
	returns None. 
	"""
	try:
		profile = libcms.cms_open_profile_from_file(filepath)
		ret = (libcms.cms_get_profile_name(profile),)
		ret += (libcms.cms_get_profile_copyright(profile),)
		ret += (libcms.cms_get_profile_info(profile),)
	except:
		ret = ('', '', '')
	return ret