kopia lustrzana https://github.com/jupyterhub/repo2docker
Remove print statement and unused import
rodzic
4b0e838136
commit
dd8ba8ec18
|
@ -4,7 +4,7 @@ import shutil
|
|||
|
||||
from os import makedirs
|
||||
from os import path
|
||||
from urllib.request import build_opener, urlopen, Request
|
||||
from urllib.request import urlopen, Request
|
||||
from urllib.error import HTTPError
|
||||
from zipfile import ZipFile, is_zipfile
|
||||
|
||||
|
|
|
@ -422,14 +422,12 @@ doi_regexp = re.compile(
|
|||
def is_doi(val):
|
||||
"""Returns None if val doesn't match pattern of a DOI.
|
||||
http://en.wikipedia.org/wiki/Digital_object_identifier."""
|
||||
print(type(val))
|
||||
print(val)
|
||||
return doi_regexp.match(val)
|
||||
|
||||
|
||||
def normalize_doi(val):
|
||||
"""Return just the DOI (e.g. 10.1234/jshd123)
|
||||
from a val that could include a url or doi
|
||||
from a val that could include a url or doi
|
||||
(e.g. https://doi.org/10.1234/jshd123)"""
|
||||
m = doi_regexp.match(val)
|
||||
return m.group(2)
|
||||
|
|
Ładowanie…
Reference in New Issue