Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Commit

Permalink
ignore absence of gtk when testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Frasca committed Jan 2, 2015
1 parent e1aa365 commit 1f6c30b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion bauble/plugins/imex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# transform from any format to another

import os, csv, traceback
import gtk.gdk, gobject
from sqlalchemy import *
import bauble
import bauble.utils as utils
Expand Down
11 changes: 9 additions & 2 deletions bauble/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@
import textwrap
import xml.sax.saxutils as saxutils

import gtk
try:
import gtk
except:
class fake:
MESSAGE_INFO = ''
BUTTONS_OK = ''

gtk = fake()

import bauble
from bauble.error import check, CheckConditionError
Expand Down Expand Up @@ -258,7 +265,7 @@ def set_widget_value(widget, value, markup=False, default=None, index=0):
.. note:: any values passed in for widgets that expect a string will call
the values __str__ method
'''
import gtk

if value is None: # set the value from the default
if isinstance(widget, (gtk.Label, gtk.TextView, gtk.Entry)) \
and default is None:
Expand Down

0 comments on commit 1f6c30b

Please sign in to comment.