# Path: dput/core.py
# CONFIG_LOCATIONS = {
#     "/usr/share/dput-ng/": 30,
#     "/etc/dput.d/": 20,
#     os.path.expanduser("~/.dput.d"): 10,
#     "skel/": 100
# }
# DPUT_CONFIG_LOCATIONS = {
#     "/etc/dput.cf": 15,
#     os.path.expanduser("~/.dput.cf"): 5
# }
# SCHEMA_DIRS = [
#     "/usr/share/dput-ng/schemas",
#     "skel/schemas"
# ]
# def _write_upload_log(logfile, full_log):
# def _enable_debugging(level):
# def mangle_sys():
# def maybe_print_traceback(debug_level, stack):
# def get_local_username():


import os
from dput.core import logger
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.

# XXX: document.




def make_delayed_upload(conf, delayed_days):
    """
    DELAYED uploads to ftp-master eventually means to use another incoming
    directory instead of the default. This is easy enough to be implemented

    Mangles the supplied configuration object
    """
    incoming_directory = os.path.join(
        conf['incoming'],
        "DELAYED",
        "%d-day" % (delayed_days)
    )

# Path: dput/core.py
# CONFIG_LOCATIONS = {
#     "/usr/share/dput-ng/": 30,
#     "/etc/dput.d/": 20,
#     os.path.expanduser("~/.dput.d"): 10,
#     "skel/": 100
# }
# DPUT_CONFIG_LOCATIONS = {
#     "/etc/dput.cf": 15,
#     os.path.expanduser("~/.dput.cf"): 5
# }
# SCHEMA_DIRS = [
#     "/usr/share/dput-ng/schemas",
#     "skel/schemas"
# ]
# def _write_upload_log(logfile, full_log):
# def _enable_debugging(level):
# def mangle_sys():
# def maybe_print_traceback(debug_level, stack):
# def get_local_username():


# Path: dput/overrides.py
import os
from dput.core import logger

# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.

# XXX: document.




def make_delayed_upload(conf, delayed_days):
    """
    DELAYED uploads to ftp-master eventually means to use another incoming
    directory instead of the default. This is easy enough to be implemented

    Mangles the supplied configuration object
    """
    incoming_directory = os.path.join(
        conf['incoming'],
        "DELAYED",
        "%d-day" % (delayed_days)
    )

    logger.debug("overriding upload directory to %s" % (incoming_directory))