aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/Main.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-07-31 02:27:41 +0300
committerGravatar Vitaly Takmazov2016-07-31 02:27:41 +0300
commit0c2ac00e800b2ed5f73a7abb9922b87329a077de (patch)
treea3a55916d815dc923ace39b6bce33d4daad6448d /juick-www/src/main/java/com/juick/www/Main.java
parent2b4b08c7954f5ae03681401b613318cfbfde1c76 (diff)
do not throw on Sape errors
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/Main.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/Main.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Main.java b/juick-www/src/main/java/com/juick/www/Main.java
index e8d53e51..56b886c9 100644
--- a/juick-www/src/main/java/com/juick/www/Main.java
+++ b/juick-www/src/main/java/com/juick/www/Main.java
@@ -35,6 +35,7 @@ import java.io.IOException;
import java.net.ConnectException;
import java.net.Socket;
import java.net.URLEncoder;
+import java.util.Objects;
import java.util.Properties;
/**
@@ -86,7 +87,12 @@ public class Main extends HttpServlet implements Stream.StreamListener {
conf.getProperty("twitter_consumer_secret"));
pagesNewMessage = new NewMessage(conf.getProperty("upload_tmp_dir", "/var/www/juick.com/i/tmp/"),
conf.getProperty("img_path", "/var/www/juick.com/i/"));
- PageTemplates.sape = new Sape(conf.getProperty("sape_user"), "juick.com", 2000, 3600);
+ String sapeUser = conf.getProperty("sape_user", "");
+ if (!Objects.equals(sapeUser, "")) {
+ PageTemplates.sape = new Sape(sapeUser, "juick.com", 2000, 3600);
+ } else {
+ log("Sape is not initialized");
+ }
} catch (Exception e) {
log(null, e);
}