Skip to content

Commit

Permalink
Changed to use lsst.log
Browse files Browse the repository at this point in the history
  • Loading branch information
John Gates committed Dec 9, 2014
1 parent 1d5751f commit 7a99aa6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
1 change: 0 additions & 1 deletion python/lsst/db/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

# standard library
import ConfigParser
import logging
import os.path
import sys

Expand Down
20 changes: 8 additions & 12 deletions tests/testUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

# LSST Data Management System
# Copyright 2014 LSST Corporation.
#
#
# This product includes software developed by the
# LSST Project (http://www.lsst.org/).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 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 LSST License Statement and
# the GNU General Public License along with this program. If not,
#
# You should have received a copy of the LSST License Statement and
# the GNU General Public License along with this program. If not,
# see <http://www.lsstcorp.org/LegalNotices/>.

"""
Expand All @@ -30,14 +30,15 @@
"""

import ConfigParser
import logging
import os
import tempfile
import time
import unittest

import lsst.log as log
from lsst.db.utils import readCredentialFile


class TestUtils(unittest.TestCase):
def testReadCredF(self):
f, fN = tempfile.mkstemp(suffix=".cnf", dir="/tmp", text="True")
Expand All @@ -51,7 +52,7 @@ def testReadCredF(self):
socket = /tmp/my/socket.sock
""")
f.close()
dict = readCredentialFile(fN, logging.getLogger("lsst.db.testDbLocal"))
dict = readCredentialFile(fN, log)
assert(dict["host"] == "localhost")
assert(dict["port"] == "3455")
assert(dict["user"] == "dummyX")
Expand All @@ -61,11 +62,6 @@ def testReadCredF(self):

####################################################################################
def main():
logging.basicConfig(
format='%(asctime)s %(name)s %(levelname)s: %(message)s',
datefmt='%m/%d/%Y %I:%M:%S',
level=logging.DEBUG)

unittest.main()

if __name__ == "__main__":
Expand Down

0 comments on commit 7a99aa6

Please sign in to comment.