Procházet zdrojové kódy

Update datautils.py

version-14
Nabin Hait před 12 roky
rodič
revize
c969c0301c
1 změnil soubory, kde provedl 4 přidání a 3 odebrání
  1. +4
    -3
      webnotes/utils/datautils.py

+ 4
- 3
webnotes/utils/datautils.py Zobrazit soubor

@@ -63,10 +63,11 @@ def read_csv_content(fcontent, ignore_encoding=False):
try:
newrow.append(unicode(val.strip(), 'utf-8'))
except UnicodeDecodeError, e:
raise Exception, """Some character(s) in row #%s, column #%s are
webnotes.msgprint("""Some character(s) in row #%s, column #%s are
not readable by utf-8. Ignoring them. If you are importing a non
english language, please make sure your file is saved in the 'utf-8'
encoding.""" % (csvrows.index(row)+1, row.index(val)+1)
encoding.""" % (csvrows.index(row)+1, row.index(val)+1))
raise Exception
rows.append(newrow)
@@ -169,4 +170,4 @@ def import_doc(d, doctype, overwrite, row_idx, submit=False):
bean.doc.fields['name']))
def getlink(doctype, name):
return '<a href="#Form/%(doctype)s/%(name)s">%(name)s</a>' % locals()
return '<a href="#Form/%(doctype)s/%(name)s">%(name)s</a>' % locals()

Načítá se…
Zrušit
Uložit