Code Duplication    Length = 12-12 lines in 2 locations

rsudp/c_telegram.py 1 location

@@ 142-153 (lines=12) @@
139
				printM('Could not find image: %s' % (imgpath), sender=self.sender)
140
141
142
	def run(self):
143
		"""
144
		Reads data from the queue and sends a message if it sees an ALARM or IMGPATH message
145
		"""
146
		while True:
147
			d = self.getq()
148
149
			if 'ALARM' in str(d):
150
				self._when_alarm(d)
151
152
			elif 'IMGPATH' in str(d):
153
				self._when_img(d)
154

rsudp/c_tweet.py 1 location

@@ 230-241 (lines=12) @@
227
				printM('Could not find image: %s' % (imgpath), sender=self.sender)
228
229
230
	def run(self):
231
		"""
232
		Reads data from the queue and tweets a message if it sees an ALARM or IMGPATH message
233
		"""
234
		while True:
235
			d = self.getq()
236
237
			if 'ALARM' in str(d):
238
				self._when_alarm(d)
239
240
			elif 'IMGPATH' in str(d):
241
				self._when_img(d)
242