Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9346517
__init__.py
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
__init__.py
View Options
# Copyright (C) 2017-2019 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
import
click
import
logging
from
swh.core.cli
import
CONTEXT_SETTINGS
logger
=
logging
.
getLogger
(
__name__
)
@click.group
(
context_settings
=
CONTEXT_SETTINGS
)
@click.pass_context
def
deposit
(
ctx
):
"""Deposit main command
"""
ctx
.
ensure_object
(
dict
)
log_level
=
ctx
.
obj
.
get
(
'log_level'
,
logging
.
INFO
)
logger
.
setLevel
(
log_level
)
def
main
():
logging
.
basicConfig
()
return
deposit
(
auto_envvar_prefix
=
'SWH_DEPOSIT'
)
# These import statements MUST be executed after defining the 'deposit' group
# since the subcommands in these are defined using this 'deposit' group.
from
.
import
client
# noqa
try
:
from
.
import
admin
# noqa
except
ImportError
:
# server part is optional
logger
.
debug
(
'admin subcommand not loaded'
)
if
__name__
==
'__main__'
:
main
()
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 4, 4:07 PM (2 w, 22 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3241944
Attached To
rDDEP Push deposit
Event Timeline
Log In to Comment