replaced os.path.split()[0] with os.path.dirname() and corrected a couple of comments
This commit is contained in:
@@ -50,7 +50,7 @@ def link_assets(theme, link_dir, printer=simple_printer):
|
|||||||
which should be printable.
|
which should be printable.
|
||||||
"""
|
"""
|
||||||
link_dir = link_dir.rstrip(os.path.sep)
|
link_dir = link_dir.rstrip(os.path.sep)
|
||||||
link_parent_dir = os.path.split(link_dir)[0]
|
link_parent_dir = os.path.dirname(link_dir)
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ TRANSLATIONS_PATH = pkg_resources.resource_filename(
|
|||||||
|
|
||||||
def locale_to_lower_upper(locale):
|
def locale_to_lower_upper(locale):
|
||||||
"""
|
"""
|
||||||
Take a locale, regardless of style, and format it like "en-us"
|
Take a locale, regardless of style, and format it like "en-US"
|
||||||
"""
|
"""
|
||||||
if '-' in locale:
|
if '-' in locale:
|
||||||
lang, country = locale.split('-', 1)
|
lang, country = locale.split('-', 1)
|
||||||
@@ -46,7 +46,7 @@ def locale_to_lower_upper(locale):
|
|||||||
|
|
||||||
def locale_to_lower_lower(locale):
|
def locale_to_lower_lower(locale):
|
||||||
"""
|
"""
|
||||||
Take a locale, regardless of style, and format it like "en_US"
|
Take a locale, regardless of style, and format it like "en_us"
|
||||||
"""
|
"""
|
||||||
if '_' in locale:
|
if '_' in locale:
|
||||||
lang, country = locale.split('_', 1)
|
lang, country = locale.split('_', 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user