tests: use pytest fixtures in gitops_test
[git-cola.git] / extras / build_util.py
blob70ad7a1956f659be2d4b72c936e3c84b5a391e40
1 def encode(string):
2 try:
3 result = string.encode('utf-8')
4 except (ValueError, UnicodeEncodeError):
5 result = string
6 return result
9 def make_string(x):
10 if x:
11 x = str(x)
12 return x
15 def stringify_options(items):
16 return [[make_string(x) for x in i] for i in items]
19 def stringify_list(items):
20 return [make_string(i) for i in items]